﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Entities;
using System.Security.Permissions;
namespace WCF_ListenMusic.Services.Module_Playlist.User
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IPlaylistService" in both code and config file together.
    [ServiceContract]
    public interface IPlaylistService
    {
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        List<Playlist> getPlaylistByMemberID(string UserName);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool InsertMusic_Into_Favorites(Favorite f);
        [OperationContract]
        int getMax_FavoritesID();
        [OperationContract]
        int getMax_PlaylistID();
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        List<FavoritePlayList> getSongInPlaylist_ByMemberID(string UserName);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool InsertPlaylist(Playlist p);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand,Role = "WCFUser")]
        List<FavoritePlayList> getSongInSpecificPlaylist(string UserName, int playlistID);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool EditPlaylist(Playlist newpl);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        Playlist getPlaylist_ByPlaylistID(int playlistID);
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Mandatory)]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool EditPlayListPicture(int plid,string imgurl);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool DeleteSongInPlaylist(int fid);
        [OperationContract]
        [PrincipalPermission(SecurityAction.Demand, Role = "WCFUser")]
        bool DeletePlaylist(int plid);
     }
}